home *** CD-ROM | disk | FTP | other *** search
/ Windows Expert / Windows Expert.iso / windownt / uupc11ys.zip / LIB / CHECKPTR.C < prev    next >
C/C++ Source or Header  |  1992-11-27  |  2KB  |  38 lines

  1. /*--------------------------------------------------------------------*/
  2. /*    c h e c k p t r . c                                             */
  3. /*                                                                    */
  4. /*    Support routines for UUPC/extended                              */
  5. /*                                                                    */
  6. /*    Changes Copyright 1990, 1991 (c) Andrew H. Derbyshire           */
  7. /*                                                                    */
  8. /*    History:                                                        */
  9. /*       21Nov1991 Break out of lib.c                          ahd    */
  10. /*--------------------------------------------------------------------*/
  11.  
  12. #include <stdio.h>
  13. #include <stdlib.h>
  14. #include <string.h>
  15. #include <time.h>
  16.  
  17. /*--------------------------------------------------------------------*/
  18. /*                    UUPC/extended include files                     */
  19. /*--------------------------------------------------------------------*/
  20.  
  21. #include "lib.h"
  22.  
  23. /*--------------------------------------------------------------------*/
  24. /*    c h e c k p t r                                                 */
  25. /*                                                                    */
  26. /*    Verfiy that a pointer is not null                               */
  27. /*--------------------------------------------------------------------*/
  28.  
  29. void checkptr(const void *block, const char *file, const int line)
  30. {
  31.    if (block == NULL)
  32.    {
  33.       printmsg(0,"Storage allocation failure; possible cause:\
  34.  memory shortage.");
  35.       bugout( line, file);
  36.    }
  37. } /* checkptr */
  38.